/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-11-24 22:18:21  
 * Copyright (c) 2015- joysuch-版权所有     
 */

package com.joysuch.wwyt.risk.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@EntityListeners({ AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Entity
@Table(name = "WWYT_RISK_POINT_EVALUATION_JHA_ITEM")
@SQLDelete(sql = "update WWYT_RISK_POINT_EVALUATION_JHA_ITEM set DELETE_FLAG = '1' where id= ?")
@SQLDeleteAll(sql = "update WWYT_RISK_POINT_EVALUATION_JHA_ITEM set DELETE_FLAG = '1' where id= ?")
@Where(clause = "DELETE_FLAG = '0'")

public class RiskPointEvaluationJhaItem implements java.io.Serializable {

    // columns START
    // ID
    private java.lang.Long id;
    // 风险评估ID
    private java.lang.Long jhaEvaluationId;
    // 作业步骤
    private java.lang.String checkItem;
    // 风险源或潜在事件
    // @NotNull(field = "风险源或潜在事件")
    private java.lang.String riskSource;
    // 可能发生的事故类型及后果
    // @NotNull(field = "可能发生的事故类型及后果")
    private java.lang.String consequence;
    // 可能性L
    // @NotNull(field = "可能性L")
    private java.lang.Float likehood;
    // 频繁程度E
    // @NotNull(field = "频繁程度E")
    private java.lang.Float exposure;
    // 严重性C
    // @NotNull(field = "严重性C")
    private java.lang.Float consequenceLevel;
    // 风险值D
    private java.lang.Float danger;
    // 评价级别
    private java.lang.Integer riskLevel;
    // 工程技术措施
    private java.lang.String controlMethodTech;
    // 管理措施
    private java.lang.String controlMethodManage;
    // 培训教育措施
    private java.lang.String controlMethodTrain;
    // 个体防护措施
    private java.lang.String controlMethodProtect;
    // 应急处置措施
    private java.lang.String controlMethodEmegency;
    // 创建人
    private java.lang.Long createBy;
    // 创建时间
    private java.util.Date createTime;
    // 更新人
    private java.lang.Long updateBy;
    // 更新时间
    private java.util.Date updateTime;
    // 删除标记
    private java.lang.String deleteFlag;
    // 组织机构代码
    private java.lang.String orgCode;
    // 租户
    private java.lang.Long tenentId;
    // columns END

    public void setId(java.lang.Long value) {
        this.id = value;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "Id", unique = true, nullable = false)
    public java.lang.Long getId() {
        return this.id;
    }

    @Column(name = "JHA_EVALUATION_ID")
    public java.lang.Long getJhaEvaluationId() {
        return this.jhaEvaluationId;
    }

    public void setJhaEvaluationId(java.lang.Long value) {
        this.jhaEvaluationId = value;
    }

    @Column(name = "CHECK_ITEM", length = 50)
    public java.lang.String getCheckItem() {
        return this.checkItem;
    }

    public void setCheckItem(java.lang.String value) {
        this.checkItem = value;
    }

    @Column(name = "RISK_SOURCE", length = 100)
    public java.lang.String getRiskSource() {
        return this.riskSource;
    }

    public void setRiskSource(java.lang.String value) {
        this.riskSource = value;
    }

    @Column(name = "CONSEQUENCE", length = 500)
    public java.lang.String getConsequence() {
        return this.consequence;
    }

    public void setConsequence(java.lang.String value) {
        this.consequence = value;
    }

    @Column(name = "LIKEHOOD")
    public java.lang.Float getLikehood() {
        return this.likehood;
    }

    public void setLikehood(java.lang.Float value) {
        this.likehood = value;
    }

    @Column(name = "EXPOSURE")
    public java.lang.Float getExposure() {
        return this.exposure;
    }

    public void setExposure(java.lang.Float value) {
        this.exposure = value;
    }

    @Column(name = "CONSEQUENCE_LEVEL")
    public java.lang.Float getConsequenceLevel() {
        return this.consequenceLevel;
    }

    public void setConsequenceLevel(java.lang.Float value) {
        this.consequenceLevel = value;
    }

    @Column(name = "DANGER")
    public java.lang.Float getDanger() {
        return this.danger;
    }

    public void setDanger(java.lang.Float value) {
        this.danger = value;
    }

    @Column(name = "RISK_LEVEL")
    public java.lang.Integer getRiskLevel() {
        return this.riskLevel;
    }

    public void setRiskLevel(java.lang.Integer value) {
        this.riskLevel = value;
    }

    @Column(name = "CONTROL_METHOD_TECH", length = 200)
    public java.lang.String getControlMethodTech() {
        return this.controlMethodTech;
    }

    public void setControlMethodTech(java.lang.String value) {
        this.controlMethodTech = value;
    }

    @Column(name = "CONTROL_METHOD_MANAGE", length = 200)
    public java.lang.String getControlMethodManage() {
        return this.controlMethodManage;
    }

    public void setControlMethodManage(java.lang.String value) {
        this.controlMethodManage = value;
    }

    @Column(name = "CONTROL_METHOD_TRAIN", length = 200)
    public java.lang.String getControlMethodTrain() {
        return this.controlMethodTrain;
    }

    public void setControlMethodTrain(java.lang.String value) {
        this.controlMethodTrain = value;
    }

    @Column(name = "CONTROL_METHOD_PROTECT", length = 200)
    public java.lang.String getControlMethodProtect() {
        return this.controlMethodProtect;
    }

    public void setControlMethodProtect(java.lang.String value) {
        this.controlMethodProtect = value;
    }

    @Column(name = "CONTROL_METHOD_EMEGENCY", length = 200)
    public java.lang.String getControlMethodEmegency() {
        return this.controlMethodEmegency;
    }

    public void setControlMethodEmegency(java.lang.String value) {
        this.controlMethodEmegency = value;
    }

    @org.springframework.data.annotation.CreatedBy
    @Column(name = "CREATE_BY")
    public java.lang.Long getCreateBy() {
        return this.createBy;
    }

    public void setCreateBy(java.lang.Long value) {
        this.createBy = value;
    }

    @org.springframework.data.annotation.CreatedDate
    @Column(name = "CREATE_TIME")
    public java.util.Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(java.util.Date value) {
        this.createTime = value;
    }

    @org.springframework.data.annotation.LastModifiedBy
    @Column(name = "UPDATE_BY")
    public java.lang.Long getUpdateBy() {
        return this.updateBy;
    }

    public void setUpdateBy(java.lang.Long value) {
        this.updateBy = value;
    }

    @org.springframework.data.annotation.LastModifiedDate
    @Column(name = "UPDATE_TIME")
    public java.util.Date getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(java.util.Date value) {
        this.updateTime = value;
    }

    @Column(name = "DELETE_FLAG", length = 2)
    public java.lang.String getDeleteFlag() {
        return this.deleteFlag;
    }

    public void setDeleteFlag(java.lang.String value) {
        this.deleteFlag = value;
    }

    @Column(name = "ORG_CODE", length = 100)
    public java.lang.String getOrgCode() {
        return this.orgCode;
    }

    public void setOrgCode(java.lang.String value) {
        this.orgCode = value;
    }

    @Column(name = "TENENT_ID")
    public java.lang.Long getTenentId() {
        return this.tenentId;
    }

    public void setTenentId(java.lang.Long value) {
        this.tenentId = value;
    }

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
                .append("jhaEvaluationId", getJhaEvaluationId()).append("checkItem", getCheckItem())
                .append("riskSource", getRiskSource()).append("consequence", getConsequence())
                .append("likehood", getLikehood()).append("exposure", getExposure())
                .append("consequenceLevel", getConsequenceLevel()).append("danger", getDanger())
                .append("riskLevel", getRiskLevel()).append("controlMethodTech", getControlMethodTech())
                .append("controlMethodManage", getControlMethodManage())
                .append("controlMethodTrain", getControlMethodTrain())
                .append("controlMethodProtect", getControlMethodProtect())
                .append("controlMethodEmegency", getControlMethodEmegency()).append("createBy", getCreateBy())
                .append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime()).append("deleteFlag", getDeleteFlag())
                .append("orgCode", getOrgCode()).append("tenentId", getTenentId()).toString();
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((checkItem == null) ? 0 : checkItem.hashCode());
        result = prime * result + ((consequence == null) ? 0 : consequence.hashCode());
        result = prime * result + ((consequenceLevel == null) ? 0 : consequenceLevel.hashCode());
        result = prime * result + ((controlMethodEmegency == null) ? 0 : controlMethodEmegency.hashCode());
        result = prime * result + ((controlMethodManage == null) ? 0 : controlMethodManage.hashCode());
        result = prime * result + ((controlMethodProtect == null) ? 0 : controlMethodProtect.hashCode());
        result = prime * result + ((controlMethodTech == null) ? 0 : controlMethodTech.hashCode());
        result = prime * result + ((controlMethodTrain == null) ? 0 : controlMethodTrain.hashCode());
        result = prime * result + ((exposure == null) ? 0 : exposure.hashCode());
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        result = prime * result + ((jhaEvaluationId == null) ? 0 : jhaEvaluationId.hashCode());
        result = prime * result + ((likehood == null) ? 0 : likehood.hashCode());
        result = prime * result + ((orgCode == null) ? 0 : orgCode.hashCode());
        result = prime * result + ((riskLevel == null) ? 0 : riskLevel.hashCode());
        result = prime * result + ((riskSource == null) ? 0 : riskSource.hashCode());
        result = prime * result + ((tenentId == null) ? 0 : tenentId.hashCode());
        result = prime * result + ((updateBy == null) ? 0 : updateBy.hashCode());
        result = prime * result + ((updateTime == null) ? 0 : updateTime.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        RiskPointEvaluationJhaItem other = (RiskPointEvaluationJhaItem) obj;
        if (checkItem == null) {
            if (other.checkItem != null)
                return false;
        } else if (!checkItem.equals(other.checkItem))
            return false;
        if (consequence == null) {
            if (other.consequence != null)
                return false;
        } else if (!consequence.equals(other.consequence))
            return false;
        if (consequenceLevel == null) {
            if (other.consequenceLevel != null)
                return false;
        } else if (!consequenceLevel.equals(other.consequenceLevel))
            return false;
        if (controlMethodEmegency == null) {
            if (other.controlMethodEmegency != null)
                return false;
        } else if (!controlMethodEmegency.equals(other.controlMethodEmegency))
            return false;
        if (controlMethodManage == null) {
            if (other.controlMethodManage != null)
                return false;
        } else if (!controlMethodManage.equals(other.controlMethodManage))
            return false;
        if (controlMethodProtect == null) {
            if (other.controlMethodProtect != null)
                return false;
        } else if (!controlMethodProtect.equals(other.controlMethodProtect))
            return false;
        if (controlMethodTech == null) {
            if (other.controlMethodTech != null)
                return false;
        } else if (!controlMethodTech.equals(other.controlMethodTech))
            return false;
        if (controlMethodTrain == null) {
            if (other.controlMethodTrain != null)
                return false;
        } else if (!controlMethodTrain.equals(other.controlMethodTrain))
            return false;
        if (exposure == null) {
            if (other.exposure != null)
                return false;
        } else if (!exposure.equals(other.exposure))
            return false;
        if (id == null) {
            if (other.id != null)
                return false;
        } else if (!id.equals(other.id))
            return false;
        if (jhaEvaluationId == null) {
            if (other.jhaEvaluationId != null)
                return false;
        } else if (!jhaEvaluationId.equals(other.jhaEvaluationId))
            return false;
        if (likehood == null) {
            if (other.likehood != null)
                return false;
        } else if (!likehood.equals(other.likehood))
            return false;
        if (orgCode == null) {
            if (other.orgCode != null)
                return false;
        } else if (!orgCode.equals(other.orgCode))
            return false;
        if (riskLevel == null) {
            if (other.riskLevel != null)
                return false;
        } else if (!riskLevel.equals(other.riskLevel))
            return false;
        if (riskSource == null) {
            if (other.riskSource != null)
                return false;
        } else if (!riskSource.equals(other.riskSource))
            return false;
        if (tenentId == null) {
            if (other.tenentId != null)
                return false;
        } else if (!tenentId.equals(other.tenentId))
            return false;
        if (updateBy == null) {
            if (other.updateBy != null)
                return false;
        } else if (!updateBy.equals(other.updateBy))
            return false;
        if (updateTime == null) {
            if (other.updateTime != null)
                return false;
        } else if (!updateTime.equals(other.updateTime))
            return false;
        return true;
    }

}
